package com.ym.medical.domain.param;

import com.ym.common.constant.BeanCovert;
import static com.ym.common.constant.ValidRule.Add;
import static com.ym.common.constant.ValidRule.Update;
import com.ym.medical.domain.entity.DataMainPicEntity;
import com.ym.common.annotations.CustomConstraint;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;

/**
 * 医院主图对象 data_main_pic
 *
 * @author ym
 * @date 2020-09-02
 */
@ApiModel("医院主图-修改")
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DataMainPicUpdateParam extends BeanCovert<DataMainPicEntity>{

    @ApiModelProperty("主键")
    @NotNull(message = "主键不能为空", groups = {Add.class, Update.class})
    private Long id;

    @ApiModelProperty("相关ID")
    @NotNull(message = "相关ID不能为空", groups = {Add.class, Update.class})
    private Long relId;

    @ApiModelProperty("图片id")
    @NotEmpty(message = "图片id不能为空", groups = {Add.class, Update.class})
    @Size(max = 64, message = "图片id长度超过{max}", groups = {Add.class, Update.class})
    private String picId;

    @ApiModelProperty("排序")
    private Integer sort;

    @ApiModelProperty("发布状态（00未发布01已发布）")
    @NotEmpty(message = "发布状态不能为空", groups = {Add.class, Update.class})
    @Size(max = 2, message = "发布状态长度超过{max}", groups = {Add.class, Update.class})
    private String publishStatus;

    @ApiModelProperty("类型(01医院)")
    @NotEmpty(message = "类型不能为空", groups = {Add.class, Update.class})
    @Size(max = 2, message = "类型长度超过{max}", groups = {Add.class, Update.class})
    private String flag;

    @ApiModelProperty("创建时间")
    @NotNull(message = "创建时间不能为空", groups = {Add.class, Update.class})
    private Date creTime;

    @ApiModelProperty("创建人")
    @NotNull(message = "创建人不能为空", groups = {Add.class, Update.class})
    private Long creSb;

}
